package file;

import java.io.File;
import java.io.IOException;

public class DeleteFileDemo {
    public static void main(String[] args) {
        for (int i = 1;i <= 100;i++){
            File file = new File("./test"+i+".txt");
            if(file.exists()){
                file.delete();
            }else {
                System.out.println("文件"+"./test"+i+".txt"+"不存在！");
            }
        }
    }
}
